
export function stateMixin (Vue){
    const dataDef = {}
    dataDef.get = function (){ return this._data }
    dataDef.set = function(){ 
        throw new Error('Avoid replacing instance root $data. ' +
        'Use nested data properties instead.',
        this) 
    }
    const propsDef = {}
    
    Object.defineProperty(Vue.prototype,'$data',dataDef)
    Object.defineProperty(Vue.prototype,'$props',propsDef)
}